package com.yxw.yx_hotel.exception;


import com.yxw.yxnet_cd_center.common.enums.ErrorCodeEnum;


/**
 * 自定义异常
 */
public class GlobalCustomerException extends RuntimeException{

    private Integer code;

    public GlobalCustomerException(String message) {
        super(message);
    }

    public GlobalCustomerException(ErrorCodeEnum errorCodeEnum) {
        super(errorCodeEnum.getMessage());
        this.code = errorCodeEnum.getCode();
    }

    public Integer getCode() {
        return code;
    }


}
